<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path;
%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
<title>云校通-教师-课程列表</title>
<jsp:include page="/WEB-INF/page/common/_header.jsp"></jsp:include>
<body ontouchstart style="background: #FFFFFF;">
	<div class="weui_tab tab-bottom">
		<div class="weui-header bg-blue"> 
	  		<div class="weui-header-left"><a href="<%=basePath %>/ls/interest/course?from=sys" class="icon icon-109 f-white">返回</a></div>
	    	<h1 class="weui-header-title">我创建的课程列表</h1>
		</div>
        <div class="weui_tab_bd">
		    <div class="weui_panel_bd" style="margin-bottom: 44px;">
			    <div class="weui_panel weui_panel_access mt0"  id="courseList">
			    	<c:forEach var="itm" items="${list }">
			    		<c:choose>
			    			<c:when test="${itm.isAgree == 0 }">
			    				<a href="<%=basePath%>/ls/interest/course/detail/edit/${itm.id}" class="weui_media_box weui_media_appmsg">
			    			</c:when>
			    			<c:otherwise>
			    				<a href="<%=basePath%>/ls/interest/course/detail/${itm.id}" class="weui_media_box weui_media_appmsg">
			    			</c:otherwise>
			    		</c:choose>
					    	<div class="weui_media_hd weui_media_hd80">
				            	<c:choose> 
				            		<c:when test="${empty itm.mainImg }">
				            			<img class="weui_media_appmsg_thumb weui_media_img80" src="<%=basePath%>/images/xqkt_default.png"/>
				            		</c:when>
				            		<c:otherwise>
				            			<img class="weui_media_appmsg_thumb weui_media_img80" src="${config.imgUrl}${itm.mainImg }">
				            		</c:otherwise>
				            	</c:choose>
				            </div>
				            <div class="weui_media_bd">
			                    <h4 class="weui_media_title">${itm.courseName }</h4>
			                    <p class="weui_media_desc pt5">审批状态: 
				                    <c:choose>
				                    	<c:when test="${itm.isAgree == 0 }"><span class="f-orange">待审核</span></c:when>
				                    	<c:when test="${itm.isAgree == 1 }"><span class="f-green">同意</span></c:when>
				                    	<c:when test="${itm.isAgree == 2 }"><span class="f-red">驳回</span></c:when>
				                    </c:choose>
			                    </p>
			                    <p class="weui_media_desc web-line-clamp3 pt5">${itm.courseDesc}</p>
				            </div>
				        </a>
				    </c:forEach>
			    </div>
		     </div>
		     <a href="<%=basePath%>/ls/interest/course/addCourse">
                <div class="addBtnnew" id="addBtnnew">
					<div class="linea"></div>
					<div class="lineb"></div>
		        </div>
	         </a>
        </div>
   </div>
</body>
<jsp:include page="/WEB-INF/page/common/_footer.jsp"></jsp:include>
</html>